package com.jiapu.controller;

import com.jiapu.common.Result;
import com.jiapu.entity.People_information;
import com.jiapu.mapper.TreeMapper;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/tree")
@CrossOrigin

public class TreeController {
    @Resource
    TreeMapper treeMapper;

    @GetMapping
    public Result getPeople_information(){
        List<People_information> people_informationList = treeMapper.findAllp();
        return Result.success(people_informationList);
    }

}
